// 注册项目所有的全局组件
// v2和v3编写插件的变化
// 整体写法不变
// v3的install方法的第一个参数发生变化 app实例 v2的install方法的第一个参数是Vue构造函数
import Skeleton from './Skeleton'
import Slider from './Slider'
import More from './More'
import Bread from './Bread'
import BreadItem from './Bread/item.vue'
import InfiniteLoad from './InfiniteLoad'
import City from './City'
import Sku from './Sku'
import Numbox from './Numbox'
import Button from './Button'
import CheckBox from './CheckBox'
import Message from './Message/index.vue'
const cps = [Message, CheckBox, Button, Numbox, Sku, Skeleton, Slider, More, Bread, BreadItem, InfiniteLoad, City]
export default {
  install (app) {
    // 手动注册
    // console.log(app)
    // app.component('Skeleton', Skeleton)
    // 循环自动注册
    cps.forEach(cp => {
      app.component(cp.name, cp)
    })
  }
}
